<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div{
      width: 100%;
      height: 50px;
      border: 1px solid black;
      margin-top: 20px;
    }

    .box1{
      background: linear-gradient(45deg , yellow 0 25% ,blue 25% 50% , green 50% 75% , red 75% 100%);
    }

    .box2{
      background: linear-gradient(to right , black 0 25% , white 25% 50% , black 50% 75% , white 75% 100%);
    }

    h1{
      display: inline;
      background: linear-gradient(45deg , orange 0 33% , blue 33% 66% , red 66% 100%);
      background-clip: text;
      color: transparent;
    }
  </style>
</head>
<body>
  <div class="box1"></div>
  <div class="box2"></div>
  <h1>国庆节快乐，7天放假</h1>
</body>
</html>